1. Field of the Invention
The present invention relates to a three-dimensional shape measuring apparatus, and particularly to a three-dimensional shape measuring apparatus using a confocal imaging system.
2. Discussion of the Background
A three-dimensional shape measuring apparatus using a confocal imaging system is used for automatic inspections of minute products on production lines.
The basic configuration of the confocal imaging system is shown in FIG. 1. Light emitted from a pinhole 1 passes through a half mirror 2. The light from the half mirror 2 is then converged by an objective lens 3 toward an object. The light which strikes the surface of the object is reflected. Of the reflected light, the light which enters the objective lens 3 is caused to converge by the objective lens 3, and is then deflected by the half mirror 2 toward the pinhole 4 which is disposed at the same position optically as the pinhole 1. The quantity (intensity) of the light passing through the pinhole 4 is measured by a detector 5. This is the basic configuration of the confocal imaging system. The position of a point on the surface of an object in the Z direction (the direction of the optical axis of the objective lens 3) can be measured using this confocal imaging system as follows.
When a point P on the surface of an object is at a position where the light converges, the light reflected from the point P is focused on the pinhole 1 if the half mirror 2 does not exist. The reflected light deflected by the half mirror 2 therefore converges on the pinhole 4 which is located at the same position optically as the pinhole 1, and most of this light passes through the pinhole 4. However, as the point P moves away from the converging position of the illuminating light in the direction of the optical axis of the objective lens 3 (the Z direction), the position at which the reflected light converges also shifts away from the pinhole 4 and the amount of light which passes through the pinhole 4 abruptly decreases.
Therefore, the height of the point P on the surface of the object can be calculated by measuring the intensity of the reflected light which passes through the pinhole 4 using the detector 5 at differing distances while changing the distance between the object and the objective lens 3 by moving the object stage in the Z direction (or by moving the confocal imaging system), and then by determining the position where the intensity of the reflected light reaches the maximum. The position of an object point at which the intensity of the light reflected from that point becomes maximum is herein called the object-position-in-focus. As described above, the object-position-in-focus is the same position as the converging position of the light.
Further, a three-dimensional shape of an object can be measured by moving the object stage in the direction at right angles to the optical axis of the objective lens 3 (XY direction) to position points on the surface of the object on the optical axis in turn and repeating the above Z-position measurement. This method, however, requires moving the object stage in the Z direction for each of a large number of points to be measured, and therefore takes a long time for measurement.
For this reason, instead of moving the object stage in the Z direction for each point to be measured on the surface of the object, the three-dimensional shape is measured by moving the object stage stepwise in the Z direction and in the XY direction so that the object is scanned by the optical axis of the objective lens 3 at each stop position of the object stage, sampling the intensity of the reflected light to obtain a two-dimensional image corresponding to the intensity of the light reflected from each measuring point on the surface of the object (this two-dimensional image is called a confocal image), and finding a confocal image for each pixel in which the intensity of light of the pixel is maximum among the thus-obtained confocal images. Accordingly, the height of the point on the surface of the object corresponding to the pixel from the Z position of the confocal image can be calculated. In this method, the object stage has to be moved in the Z direction only once, and therefore the measuring speed is improved in comparison with the above described method which is more faithful to the principle of measurement of the three-dimensional shape of an object.
However, since scanning in the XY direction by moving the object stage in the XY direction takes a long time, a method for scanning a laser beam using a light-deflecting means such as an AO element, an EO element, a galvano-mirror, or a polygon mirror, and scanning by rotating at high speed a disk (Nipkow disk) containing a number of pinholes spirally arranged, is used to further increase the measuring speed. The apparatus using these scanning methods is called a three-dimensional shape measuring apparatus using a scanning confocal imaging system. This type of apparatus has the following problems. Since the apparatus cannot simultaneously detect the reflected light from all points for measuring an object, the Z positions for various points gradually shift, one after another, by a small distance if acquisition of a confocal image is performed continuously moving the object stage in the Z direction. This slight shifting in the Z position causes errors. For this reason, the object stage must be moved by steps in the Z direction, and moving the object stage by steps takes a much longer time than moving it continuously. In addition, deviations in scanning and sampling timing cause errors in the XY positions of the measured points of a confocal image.
To acquire more accurate confocal images at a higher speed and to simplify the structure of the apparatus, Japanese Patent Applications Laid-open (JPA) No. 265918/1982 and No. 181023/1995 disclose three-dimensional shape measuring apparatuses which acquire confocal images without optical scanning by arranging confocal imaging systems in parallel (hereinafter referred to as an arrayed confocal imaging system).
The apparatus of JPA No. 265918/1982 is shown in FIG. 2, in which light emitted from a white-light source 6 is refracted into parallel light rays by a collimating lens 7 and directed onto a pinhole array 8. The pinhole array 8 consists of a large number of pinholes arranged on the same plane. Each pinhole of the pinhole array 8 can be regarded as a point light source, and therefore the pinhole array 8 is equivalent to an array of point light sources. The light which passes through the pinholes of the pinhole array 8 then passes through a half mirror 2, and the light emitted from the half mirror 2 is directed onto an object O by an objective lens 3 consisting of lenses 10 and 11 and a telecentric diaphragm 12 placed between the lenses 10 and 11. The reflected light from the object O is converged through the objective lens 3 and is deflected by the half mirror 2. It then enters a CCD sensor 9. This configuration is equivalent to a plurality of confocal imaging systems arranged in parallel. Although confocal imaging systems generally must be disposed apart from one another by a distance five to ten times the diameter of the pinhole in order to provide a plurality of confocal imaging systems in parallel, the size of this apparatus is reduced to a reasonable size by using pinholes of a very small diameter and thereby disposing the confocal imaging systems more close together. In addition, by using a CCD sensor with a small aperture ratio (i.e. the ratio of the size of the photoelectric elements of a CCD to the pixels is very small), this apparatus eliminates the use of pinholes which are necessary on the detection side in the conventional configuration.
Next, the apparatus disclosed in JPA No. 181023/1995 is shown in FIG. 3. The light source 6 of this apparatus is a laser beam source, and a beam expander 2 is used to obtain parallel light rays of a large diameter. The light emitted from the beam expander 2 enters an illuminating and detecting section 5. As shown in an enlarged drawing in FIG. 4, the illuminating and detecting section 5 consists of a mask 15 with a large array of circular holes, a reflex hologram 16 which reflects and diffracts incident light from below, a microlens array 17 which converges the light, a detector array 18, and a pinhole array 19. Of the parallel light rays incident on the illuminating and detecting section 5, only the light which passes through the holes of the mask 15 enters the hologram 16. The zeroth-order diffracted light of the hologram 16 enters the corresponding lens of the microlens array 17 and is converged by the lens to pass through the corresponding pinhole of the pinhole array 19. The light which passes through the pinholes of the pinhole array 19 is shone on an object O through an object lens 3 consisting of lenses 10 and 11 and a telecentric diaphragm 12 placed between the lenses 10 and 11. The reflected light from the object O again passes through the same pinhole of the pinhole array 19 as the illuminating light passes through and is refracted by the corresponding lens of the microlens array 17 into parallel light rays to reach the reflex hologram 16. Part of the light is reflected by the reflex hologram 16. Of this reflected light, the first-order diffracted light is converged by the corresponding lens of the microlens array 17 onto the corresponding detector of the detector array 18. This apparatus is compact as compared with the apparatus disclosed by JPA No. 265918/1992, because only one pinhole array 19 is used instead of the two pinhole arrays used in the JPA No. 265918/1992 (one at the illumination side for illuminating an object by point sources and the other at the detection side for detecting the reflected light from the object), the half mirror is eliminated, and the detection array 18 is disposed in almost the same plane as the pinhole array 19.
However, there are following problems with the above conventional three-dimensional shape measuring apparatuses with an arrayed confocal imaging system.
In the apparatus of JPA No. 265918/1992, individual photoelectric elements of the CCD sensor must perform the function of pinholes on the detection side. Therefore, the reflected light from a point on the object O to be measured at the object-position-in-focus must be made to converge accurately on the corresponding photoelectric element of the CCD sensor. For this purpose, the pinhole array 8, the objective lens 3, and the CCD sensor 9 must be in precise alignment, and very precise (submicron order) positioning is required. Further, the diameter and pitch of the pinholes of the pinhole array 8 must equal those (diameter about 2 .mu.m and pitch about 10 .mu.m) of the photoelectric element of the CCD sensor 9. In such a configuration, however, the rate at which the light passes through the pinholes (coefficient of utilization) decreases considerably, and it is difficult to obtain light with the intensity necessary for measurement. Although the microlenses are aligned coaxially with the pinholes, it is impossible in practice to converge light into a spot 2 .mu.m in diameter by a microlens 10 .mu.m in diameter, taking diffraction of light into account. Therefore, the diameter of the spot is relatively larger than that of the pinholes and it is difficult to sufficiently increase the coefficient of utilization of illuminating light.
On the other hand, the apparatus of JPA No. 181023/1995 uses one pinhole array as the illuminating pinhole array and the detecting pinhole array, and hence does not have the problem of alignment of the pinholes of the illuminating pinhole array and the photoelectric elements of a CCD as in the case of the apparatus in JPA No. 265918/1992. It also does not have the problem of inadequate intensity of illuminating light because the size of the microlenses can be determined independently of the CCD sensor. However, a large-scale facility is needed for manufacturing this apparatus because of its very complicated structure. Specifically, the same process technology as required for the manufacture of semiconductor devices is required for manufacturing the pinhole array, detector array, and circuits for reading out data from the integrated detectors, and a dedicated production line is needed. Another dedicated production facility is needed for laminating the reflex hologram and the microlens array, and then precisely aligning the microlens array with the pinhole array and joining them together. Moreover, laser light must be used for the reflex hologram to fulfill its function, but laser light is prone to interfere and is not suited for measurement of a three-dimensional shape. For example, if there is an unevenness of 1/4 .lambda. (wavelength) in the area of a point on an object to be measured, the reflected light disappears because of interference. Therefore, measuring the height of such a point is impossible. Measurement in color is also impossible with laser light. Furthermore, this apparatus cannot separate illuminating light and reflected light by a dichroic mirror, a technique which is necessary for fluorescent observation in the biotechnology field.
Since the conventional three-dimensional shape measuring apparatuses with an arrayed confocal imaging system have the above-described problems, there is a strong demand for a new three-dimensional shape measuring apparatus with an arrayed confocal imaging system which can solve these problems.
In both the above-described conventional scanning-type and arrayed-type three-dimensional shape measuring apparatuses with the confocal imaging system, the distance between an object and the objective lens must be changed by moving the object stage in the Z direction. Therefore, these apparatuses need a precision moving mechanism for moving the object stage in the Z direction, which makes them complex and large. Further, in the step moving method in which the object stage is moved step by step to acquire a confocal image at each stop position, it takes a very long time to obtain a large number of confocal images while maintaining the required high accuracy of the stop positions. On the other hand, in the continuous moving method in which the object stage is continuously moved to acquire a confocal image at each predetermined position, it is difficult to maintain the required accuracy because the acquisition timing affects the positional accuracy.
Hence, to improve the measuring speed and accuracy of the conventional three-dimensional shape measuring apparatuses, there is a demand for a three-dimensional shape measuring apparatus with a confocal imaging system which has a new means capable of quickly and accurately changing the relative positions between the object and the object-position-in-focus, instead of using an object stage movable in the Z direction.
Finally, although the measuring speed of the three-dimensional shape measuring apparatus using an arrayed confocal imaging system has been remarkably improved as described above, the speed is not yet sufficient for various applications in which a high measuring speed is required. A further improvement in the measuring speed has been difficult because of the following reasons. Readout of the data from the CCD sensor is performed serially, and hence the image data is serially input from the three-dimensional shape measuring apparatus to the image processor which calculates the three-dimensional shape from confocal image data. Each time the data for one pixel is input, the image processor carries out the maximum value detection processing for that pixel to determine confocal image in which the intensity of light of that pixel is maximum. Since the maximum value detection processing is thus carried out for a great number of pixels one by one in turn, processing of one confocal image takes a long time. For example, when the number of the photoelectric elements (pixels) of the CCD sensor used is 500.times.500, the maximum value detection processing must be repeated 250,000 times for each confocal image. Further, since confocal images are taken in using a desired resolution in height as the interval in the Z direction, acquisition of a large number of confocal images is needed for a predetermined measuring range in the Z direction. For example, when the requested resolution is 1 .mu.m and the measuring range is 200 .mu.m, 200 incidents of image acquisition must be performed at a plurality of Z positions, each different from the others by 1 .mu.m.
Therefore, to further increase the measuring speed of a three-dimensional shape measuring apparatus with an arrayed confocal imaging system, there is a requirement for a three-dimensional shape measuring apparatus with an arrayed confocal imaging system which has an image processor capable of more quickly and precisely calculating the three-dimensional shape of an object from input confocal images.